﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Streambolics.Gui
{
    /// <summary>
    ///     A dialog box showing the properties of an object.
    /// </summary>
    
    public partial class PropertyDialog : Streambolics.Gui.OkDialog
    {
        public PropertyDialog ()
        {
            InitializeComponent ();
        }

        /// <summary>
        ///     Shows the properties of an object.
        /// </summary>
        /// <param name="o">
        ///     The object to show
        /// </param>

        public void ShowObject (object o)
        {
            propertyGrid.SelectedObject = o;
        }

        /// <summary>
        ///     Show the properties of an object, in read only.
        /// </summary>
        /// <param name="o">
        ///     The object to show.
        /// </param>

        public void ShowReadonlyObject (object o)
        {
            ShowObject (o);
        }

        private void button_OK_Click (object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
        }
    }
}
